import request from "@/utils/request.js";

// 获取应急预警列表
export function getEmergencyWarningList(data, query = {}) {
    return request({
        url: '/bussiness/WARNING/list',
        method: 'post',
        params: query,
        data: data,
        isEncrypt: false
    })
}

// 应急我的任务
export const getTaskList = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/TASK/list',
        data: data,
        isEncrypt: false
    })
}

// 应急通讯录列表
export const getEmergencyContactList = (data, query = {}) => {
    return request({
        url: '/bussiness/ADDRESSBOOK/list',
        method: 'post',
        params: query,
        data: data,
        isEncrypt: false
    })
}

// 取消应急预警
export const cancelEmergencyWarning = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/WARNING/edit',
        data: data,
        isEncrypt: false
    })
}

// 删除应急处置
export const deleteEmergencyAction = (id) => {
    return request({
        method: 'post',
        url: '/bussiness/WARNING/remove',
        params: {
            ids: id
        },
        isEncrypt: false
    })
}

// 获取应急预警详情
export const getEmergencyWarningDetail = (id) => {
    return request({
        method: 'get',
        url: '/bussiness/WARNING/info',
        params: {
            id: id
        },
        isEncrypt: false
    })
}